package inits

import (
	"api-client/unite"
	"log"

	"github.com/google/uuid"
)

func InitConsul() {
	consul := unite.NewConsul("14.103.168.20", 8500)
	id := uuid.NewString()
	register := unite.ConsulRegister{
		ID:      id,
		Name:    "wer",
		Tags:    []string{"user_client"},
		Port:    8500,
		Address: "14.103.168.20",
	}
	err := consul.Regis(register)
	if err != nil {
		panic(err)
		return
	}
	log.Println("成功")

}
